package yr.website

class Manager {
    String account
    String name
    String password
    String email
    String job
    Date createDate
    String rolesId
    Boolean state

    /**
     * 映射。
     */
    static mapping = {
        table "sys_manager"
        version false
        account(column: "account", sqlType: "varchar(20)")
        name(column: "name", sqlType: "varchar(50)")
        password(column: "password", sqlType: "varchar(200)")
        email(column: "email", sqlType: "varchar(20)")
        job(column: "job", sqlType: "varchar(20)")
        createDate(column: "lastime", sqlType: "datetime")
        rolesId(column: "rolesId", sqlType: "varchar(100)")
        state(column: "state", sqlType: "tinyint(1)", defaultValue: "1", insertable: false)
    }

    static constraints = {
        account(nullable: false, unique: true)
        name(nullable: true, unique: false)
        password(nullable: false, unique: false)
        email(nullable: true, unique: false)
        job(nullable: true, unique: false)
        createDate(nullable: true, unique: false)
        rolesId(nullable: true, unique: false)
        state(nullable: true, unique: false)
    }
}
